The Compression Information Structure
The compression information structure defines the characteristics of a buffer that contains a captured image that has been compressed. Callback functions use compression information structures to exchange information about compressed images. For example, the compress-complete function must format a compression information record whenever a video frame is compressed (see "Video Channel Callback Functions" beginning on page 5-95 for more information about the compress-complete callback function). TheSGCompressInfo
data type defines a compression information structure.
struct SGCompressInfo { Ptr buffer; /* buffer for compressed image */ unsigned long bufferSize; /* bytes of image data in buffer */ unsigned char similarity; /* relative similarity */ unsigned char reserved; /* reserved--set to 0 */ }; typedef struct SGCompressInfo SGCompressInfo;
Field Description
buffer
- Points to the buffer that contains the compressed image.
This pointer must contain a 32-bit clean address.bufferSize
- Specifies the number of bytes of image data in the buffer.
similarity
- Indicates the relative similarity of this image to the previous image in a sequence. A value of 0 indicates that the current frame is a
key frame in the sequence. A value of 255 indicates that the current frame is identical to the previous frame. Values from 1 through 254 indicate relative similarity, ranging from very different (1) to very similar (254).reserved
- Reserved for use by Apple. Set this field to 0.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help